<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/3.2.47/vue.global.min.js"></script>
    <style>
      .wrapper {
        position: relative;
        height: 400px;
        width: 100%;
        box-sizing: border-box;
        overflow-x: auto;
        background-color: #fff;
        border: 1px solid red;
      }
      .content {
        background-color: orange;
        width: 4000px;
        height: 60px;
        margin-bottom: 20px;
      }
      .bar-wrapper {
        position: absolute;
        top: 70px;
        right: 0;
        left: 0;
        width: 60px;
        height: 20px;
        background-color: skyblue;
        margin: auto;
      }
    </style>
  </head>
  <body>
    <div style="overflow: hidden; width: 300px; position: relative">
      <!-- 容器 -->
      <div class="wrapper">
        <!-- 实际内容 -->
        <div class="content"></div>
      </div>
      <div class="bar-wrapper">
        <div class="bar"></div>
      </div>
    </div>

    <script></script>
  </body>
</html>
